Goto

Collaborating Authors

 python and logistic regression


Creating an Algorithmic Trading Strategy Using Python and Logistic Regression

#artificialintelligence

Obtaining historical data on the stocks that we want to observe is a two-step process. The library get-all-tickers allows us to compile a list of stock tickers by filtering companies on aspects like market cap or exchange. For this example, I am looking at companies that have a market cap between $150,000 and $10,000,000 (in millions). You will notice that I also included a line of code to print the number of tickers we are using. You will need to be sure that you are not targeting more than 2,000 tickers, because the Yfinance API has a 2,000 API calls per hour limit.